--- a/tools/winebuild/main.c	2019-05-10 21:04:22.946749869 +0300
+++ b/tools/winebuild/main.c	2019-05-10 21:11:45.232992256 +0300
@@ -47,10 +47,13 @@
 int force_pointer_size = 0;
 int unwind_tables = 0;
 
+#undef FORCE_POINTER_SIZE
 #ifdef __i386__
 enum target_cpu target_cpu = CPU_x86;
+#define FORCE_POINTER_SIZE
 #elif defined(__x86_64__)
 enum target_cpu target_cpu = CPU_x86_64;
+#define FORCE_POINTER_SIZE
 #elif defined(__powerpc__)
 enum target_cpu target_cpu = CPU_POWERPC;
 #elif defined(__arm__)
@@ -619,6 +622,10 @@
     signal( SIGTERM, exit_on_signal );
     signal( SIGINT, exit_on_signal );
 
+#ifdef FORCE_POINTER_SIZE
+    force_pointer_size = sizeof(size_t);
+#endif
+
     argv = parse_options( argc, argv, spec );
     atexit( cleanup );  /* make sure we remove the output file on exit */
 
--- a/tools/winegcc/winegcc.c	2019-05-10 21:04:22.951749823 +0300
+++ b/tools/winegcc/winegcc.c	2019-05-10 21:12:46.477428568 +0300
@@ -224,10 +224,13 @@
     strarray* files;
 };
 
+#undef FORCE_POINTER_SIZE
 #ifdef __i386__
 static const enum target_cpu build_cpu = CPU_x86;
+#define FORCE_POINTER_SIZE
 #elif defined(__x86_64__)
 static const enum target_cpu build_cpu = CPU_x86_64;
+#define FORCE_POINTER_SIZE
 #elif defined(__powerpc__)
 static const enum target_cpu build_cpu = CPU_POWERPC;
 #elif defined(__arm__)
@@ -1351,6 +1354,10 @@
     opts.winebuild_args = strarray_alloc();
     opts.pic = 1;
 
+#ifdef FORCE_POINTER_SIZE
+    opts.force_pointer_size = sizeof(size_t);
+#endif
+
     /* determine the processor type */
     if (strendswith(argv[0], "winecpp")) opts.processor = proc_cpp;
     else if (strendswith(argv[0], "++")) opts.processor = proc_cxx;
